package cn.geminis.devops.jenkins;

def analyze(params) {
    def scannerHome = tool 'SonarQubeScanner'
    withSonarQubeEnv('Default') {
        sh scannerHome + '/bin/sonar-scanner' +
                ' -Dsonar.projectKey=${JOB_NAME}' +
                ' -Dsonar.login=' + env.SONARQUBE_AUTH_TOKEN +
                params
    }
}